<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>



  
  
  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">



  
  
  
  <title>Eclipse Workflow</title>
</head>


<body>



<h1>Introduction</h1>

Eclipse represents a development platform written mostly in Java. It is
designed to be platform indepedent &nbsp;- you can write applications
under any supported operating system&nbsp;and have the same user
interface experience. Moreover, Eclipse is plugin based. It is composed
of many pieces that offer functionality in user interface, file types
support, projects, building, etc. These plugins can be stand alone
(e.g. word-wrap support), or organized together in modules (e.g. C/C++
Development, or Java Development). The Eclipse Platform holds
everything together, loads the plugins at start-up, provides the basic
user interface, and manages automatic updates for the modules and the
platform itself.<br>

<br>

In the next paragraphs we will cover the basic Eclipse environment
installation process. We will first install a basic, functional,
Eclipse IDE, then add the necessary modules in order to make Cobble
development possible: CDT (C/C++ Development Tooling) module, and
Subclipse, a SVN version control system client.<span style="font-weight: bold;"><span style="font-weight: bold;"></span></span>
<h1>Installing Eclipse</h1>

We said earlier that Eclipse is plugin based. So, theoretically you can
download each piece of it separately, then put it together and have a
platform for whatever you want, such as Java, C++, Python, Web
development, or
even all of them. However, it is pretty difficult to do so, especially
for a beginner, so the Eclipse guys prepared a convenient package of
Eclipse that contains everything you need to get started developing
with Eclipse: the Platform, the Java development module, and some other
smaller modules. (As a side-note, the Java module is the one that
makes Eclipse famous for being a powerful Java IDE. It is the oldest
and most complex module of the Eclipse project, and is usually present
in every Eclipse package.)<br>

<br>

This typical Eclipse package is called the Eclipse SDK, and could be
easy obtained from the project site at
http://www.eclipse.org/downloads/. Note that Eclipse comes with no
installer. It is simply a zipped archive, and it's up to you where you
extract the contents on your computer.<br>

<br>

<h2>Installing on Linux</h2>

If you're trying to download the installation kit from a Linux box,
there are chances that the first download you'll be offered to be
precisely the one for your Linux machine (that is,
eclipse-SDK-*-linux.gtk.tar.gz). If for any reason, the link on the
first download page does not contain the suitable Eclipse package for
your distribution (e.g. you're offered a x86 binary and you're using a
x86_64 Linux distro), you can always click on the <span style="font-style: italic;">Other downloads for 3.x</span> link. Here you'll be presented with all the possible downloads for that specific version of the platform.<br>
Some care must be taken when choosing the package, as choosing a
incorrect package will lead to you having downloaded ~100MB for
nothing. That is because although the Eclipse IDE is written in Java
and should be platform independent, it uses some platform specific to
create a snappier and neater UI.<br>
Once the correct package has been downloaded, all you have to do is to
extract the contents of the archive to a location of your choice
(usually /opt or /usr/local ). Also, maybe you'll want to create a link
for the eclipse executable in a folder in you path (usually /usr/bin ).<br>

<h2>Installing on Windows</h2>
If you're trying to download the installation kit from a Windows box,
there are chances that the first download you'll be offered to be
precisely the one for your Windows machine (that is,
eclipse-SDK-*-win32.zip). If for any reason, the link on the
first download page does not contain the suitable Eclipse package for
your distribution (e.g. you're offered a Linux package), you can always click on the <span style="font-style: italic;">Other downloads for
3.x</span>
link. Here you'll be presented with all the possible downloads for
that specific version of the platform. Choose the one that ends with
win32 (e.g. for the latest release that is eclipse-SDK-3.2.2-win32.zip
).<br>
Once
the correct package has been downloaded, all you have to do is to
extract the contents of the archive to a location of your choice
(usually C:\Program Files\ or the like ). Also, maybe you'll want to create a link
for the eclipse executable in the Start menu or on your desktop.<br>
<h2>First run</h2>
The first time you run Eclipse, after a brief show of a splashscreen
you'll be presented with a dialog box asking you to specify a location
for the workspace. The workspace is a folder that will containt all the
settings regarding the individual projects and the platform itself.
Accept the default proposal, or choose a different location to your
like. You have the option to set this as the default and never be
bothered again, or to be presented the workspace selection dialog on
every startup of the platform.<br>
Once this step is complete we have fully functional Eclipse platform.
You can go and play a little with the UI, editors and preferences,
explore the types of projects offered by the default configuration
(that is, mostly Java projects) or do a quick tutorial. When you're
done with it we can move on to...


<h1>Installing the Additional Modules</h1>



Installing additional modules is as easy as finding the online
repository for the desired module and adding it to the module manager.
Installing from an local copy is also possible but will not be
discussed in this tutorial.<br>
For all the additional modules, installing consists of the following basic steps:<br>
<ul>
  <li>specifying a name and an URL for the repository</li>
  <li>downloading the actual module package</li>
  <li>accepting the licence agreement for the module</li>
  <li>installing the module</li>
  <li>restarting Eclipse</li>
</ul>
Although the last step is optional, it's also recommended, in order to ensure proper functioning of the installed modules.<br>
<h2>Installing C Developement Tools (CDT)</h2>
Open the Software updates manager. This is done via the Help &gt;
Software update &gt; Find and install... menu entry. Once selected
you'll be presented with a dialog box that allows you to
either&nbsp;search for updates for the already installed features or
search for new features to install. We want to install a new module, so
you'll choose the last option.<br>
The next page of the wizard already contains an entries coresponding to
the current Eclipse update repository and the Callisto Discovery
Service.The latter contains the desired functionality, so you'll check
it and go to the next step, by clicking Finish.<br>
Provided your Internet connetion is up and ready you'll be presented
with a list of available mirrors. Chose the one that is closest to you
or accept the default selection. Once the modules list has been
downloaded a window containing the modules found. Check the C and C++
Developement item and click next.<br>
Then, it's just a matter of accepting License agreements and allowing the installation of the module and/or restart of the IDE.<br>
For other issues regarding CDT, consult <a href="http://www.eclipse.org/cdt/index.php">http://www.eclipse.org/cdt/index.php</a> .
<h2>Installing Subclipse (SVN client)</h2>
Installing the SVN client is a bit trickyer as it's not included in the main Eclipse repository.<br>
To do this, open up the Software updates manager and get to the point
where you selected the Calisto repository. Add a new repository by
clicking on the New remote site button. In the Name edit box enter
something meaningful, like Subclipse 1.2 for instance, and in the URL
textbox enter the &nbsp;following URL:
http://subclipse.tigris.org/update_1.2.x . Once you click OK, a new
entry labeled Subclipse 1.2 should appear in the list at the left.
Check the newly added item, and click Finish. The rest of the process
is similar to the installation of the CDT. Expand the Subclipse item
and check the Subclipse 1.2 branch (we don't need no Mylar
integration). Then, it's all the usual Next, Next, Accept, Install
process described above.<br>
For other issues regarding Subclipse, consult <a href="http://subclipse.tigris.org/">http://subclipse.tigris.org/</a> .<br>
<br>
<span style="font-weight: bold;">Note on installing modules:</span> In
order for the modules to be installed and available system wide, you
must do the above steps with administrative privileges and / or with
read-write rights on the Eclipse directory (/opt/eclipse or
/usr/local/eclipse ).


<h1>Creating a C/C++ Project</h1>






<h2>Creating a New Local Project</h2>



Just to get a feel on how Eclipse is organised you could go and try
creating first a simple local C/C++ project (The typical Hello world
example maybe?).<br>
Things are pretty straight-forward. File &gt; New &gt; Other... will
pop up a window allowing you to choose from a plethora of items. If
you've played with this dialog just after installing Eclipse, you might
notice that now the list is a little longer, as it contains entries for
C, C++ and SVN.<br>
Expand the C node and you'll see a list of possible new items
associated with this type of "perspective" / developement tool. Along
with the proper project, there's also the possibilty to create single
source or header files, or to convert projects.<br>
When you start a new, local project from scratch what you'll want will
usually be a Managed Make C Project. The main difference between a
Managed and a Standard Make C Project is that in the case of a Managed
Make project, Eclipse will take care of creating and updating the
makefile for you. With a Standard Make project, you'll have to supply
your own makefile and take care to update it as new files are added to
your project.<br>
A project can be created in the default location - in the workspace
folder specified at startup, or in a different folder. The location is
up to you and your way of organizing (or not) your data.<br>



<h2>Checking Out a Project from SVN</h2>



When you're confortable with the concept of projects in Eclipse, we can
me move on to the next step: checking out a project from SVN. That is,
connecting to the remote server, authenticate, download the source and
specify different project parameters pertaining to the connection
details.<br>
In order to do that, bring up the New dialog and select SVN : Checkout
Project from SVN. We'll assume that you haven't obtained the sources
yet, so you'll set up a new repository. In the URL textbox enter the
following address: https://cobble.googlecode.com/svn . Clicking Next
will prompt you for a username and password. Use the username with
which you are registered on the project page and the Google Code
generated password.<br>
If all the data was entered correctly, you'll be presented with the SVN
tree on the server. Select the folder you want to check out (this will
most probably be /trunk ) and click Next. Accept the default options
(Check out as a project configured using the New Project Wizard and
Revision to checkout: Head) by clicking on Finish.<br>
In the new project dialog that appears, choose Standard C Make Project
and go on with the default settings. Choose a name for the project
(again, use something meningful, like Cobble :) ) and, if needed, a
path for the files.<br>
The project will now be check out, and you'll be ready to start working
on your fresh, up to date copy of the Cobble source-code. Checking out
a project can take some time depending on the number of files and the
connection speed, so be patient.
<h1>SVN Workflow in Eclipse</h1>
The SVN workflow in Eclipse is nothing different than the SVN workflow
in any other IDE / platform, be it Visual Studio Team Architect, or vim
:-p.<br>
To summarize, the workflow on a SVN project is as follows (supposed you have already checked out the project):<br>
<ul>
  <li>you start working on an existing file or a module. Once you decide it's time to persist the changes to the server you do a SVN <span style="font-weight: bold;">commit</span>.
Usually you'll be asked to accompany the commit with a short comment,
detailing the changes on the file. This can be done though the&nbsp;</li>
  <ul>
    <li>if someone else modified the same file as you did, you'll be
presented with a merge dialog, allowing you to select what to be
preserved in the final version (commited version) of the file.&nbsp;</li>
  </ul>
  <li>you add a new file. The new file can be added to the versioning
control or be ignored. Once you decide to add it to source control, you
can commit it as any other file.</li>
  <li>you start working on a new file or module. It's a good practice to first <span style="font-weight: bold;">update</span>, in order to be sure you have the latest version of the file available.</li>
</ul>
All the SVN commands are available through the Team menu by right clicking on a file or folder in the project view.<br>
<h4>Version history:</h4>
<ul>
  <li>v0.1 - General tutorial structure. Introduction</li>
  <li>v1.0 - First public release.</li>
</ul>
</body>
</html>
